<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div style="float: left; width: 50%; padding-right: 15px;">
                <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
            </div>
            <div style="float: right; width: 50%; padding-left: 15px;">
                <span style="color:#ff0000; line-height:34px;">宽度*厚度*米数</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_id" data-rule="required" data-source="clothmaking_product/index" data-field="name" class="form-control selectpage" name="row[product_id]" type="text" value="{$row.product_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_info')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="product-info" data-rule="required"  class="form-control"  type="text" value="" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">含税单价:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit_price_with_tax" data-rule="required" class="form-control" type="number" step="0.01" value="{$row.unit_price}" placeholder="请输入含税单价，单价将自动计算">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Customer_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customer_id" data-rule="required" data-source="clothmaking_customer/index" data-field="customer_name" class="form-control selectpage" name="row[customer_id]" type="text" value="{$row.customer_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tax_rate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tax_rate" data-rule="required" class="form-control" step="0.01" name="row[tax_rate]" type="number" value="{$row.tax_rate|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">税额:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tax_amount" class="form-control" type="text" readonly value="">
            <small class="text-muted">此为自动计算结果，请勿手动修改</small>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit_price" class="form-control" name="row[unit_price]" type="text" readonly value="{$row.unit_price|htmlentities}">
            <small class="text-muted">此为根据含税单价和税率自动计算的结果</small>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Width')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-width" class="form-control" name="row[width]" type="number" step="0.01" value="{$row.width|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Length')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-length" class="form-control" name="row[length]" type="number" step="0.01" value="{$row.length|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-unit" data-rule="required" class="form-control" name="row[unit]">
                <option value="平方米" {if $row.unit=='平方米'}selected{/if}>平方米</option>
                <option value="支" {if $row.unit=='支'}selected{/if}>支</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_model')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_model" data-rule="required" class="form-control" name="row[product_model]" type="text" value="{$row.product_model|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
